﻿<%@ Page Language="C#" AutoEventWireup="true" EnableViewState="false" CodeBehind="SearchFriend.aspx.cs" Inherits="NJL.WebUsers.SearchFriend" %>

<%@ Import Namespace="Royalsoft.Common" %>
<%@ Register Src="Controls/WUCHeader.ascx" TagName="WUCHeader" TagPrefix="uc1" %>
<%@ Register Src="Controls/WUCFooter.ascx" TagName="WUCFooter" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="Styles/base1.css" />
    <script type="text/javascript" language="javascript" src="Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript">
        function getUserId(userid) {
            document.getElementById("hiduserid").value = userid;
        }
        function SendMes() {
            var userid = document.getElementById("hiduserid").value
            var content = document.getElementById("TextArea1").value;
            content = $.trim(content);
            if (content == "") {
                alert("内容不能为空哦^_^")
                return false;
            }
            if (content.length > 500) {
                alert("发送消息不能超过500个字符哦");
                return false;
            }
            $.ajax({
                type: 'POST',
                url: '../Handle/Handler.ashx',
                data: 'sendUserid=' + userid + '&content=' + escape(content) + '&Random=' + Math.random(),
                dataType: 'text',
                success: function (msg) {
                    if (msg == "true") {
                        document.getElementById("TextArea1").value = "";
                        alert("发送信息成功");
                        $.skygqbox.hide();
                    }
                },
                error: function () {
                    $.skygqbox.hide();
                }
            })
        }
        function AddUser(userid) {
            $.ajax({
                type: 'get',
                url: '/Handle/Handler.ashx',
                data: 'userid=' + userid + '&Random=' + Math.random(),
                dataType: 'text',
                success: function (msg) {
                    if (msg == "true") {
                        alert("添加关注成功")
                        window.location.reload();
                    }
                    else {
                        if (msg == "nologin") {
                            document.location.href = '/Login.aspx?url=' + location.href;
                        }
                    }
                },
                error: function () {
                    alert("添加关注失败");
                }
            })

        }
        function DeleteUser(userid) {
            $.ajax({
                type: 'get',
                url: '/Handle/Handler.ashx',
                data: 'deleteFriend=' + userid + '&Random=' + Math.random(),
                dataType: 'text',
                success: function (msg) {
                    if (msg == "true") {
                        alert("取消关注成功");
                        window.location.reload();

                    }
                },
                error: function () {

                }
            })
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <uc1:WUCHeader ID="WUCHeader1" runat="server" />
    <div class="w1003 cleanFlex m_top_5">
        <div>
            <div class="leftSrarch f_left">
               <div class="place02">
            <p>
                您现在的位置是：<a href="/">首页</a>>><span><a href="/xcgc/">乡村广场</a></span>>><span>搜索结果</span>
            </p>
           
           </div>
                <!--搜索-->
                <div class="gray_border  ksearch graybg" style="padding: 6px;">
                    <asp:TextBox ID="txtKeywords" runat="server" MaxLength="30" class="input" Style="width: 620px"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" class="searchBtn" onmouseover="this.className='searchBtnover'"
                        onmouseout="this.className='searchBtn'" OnClick="btnSearch_Click" />
                </div>
                <!--结果-->
                <div class="searchResult">
                    <p>
                        共有<asp:Literal ID="litSearchCount" runat="server"></asp:Literal>个结果</p>
                    <!--列表-->
                    <div>
                        <asp:Repeater ID="rptUserList" runat="server" OnItemDataBound="rptUserList_ItemDataBound">
                            <ItemTemplate>
                                <dl class="imglist cleanFlex">
                                    <dt><a href="Visitor/Default.aspx?uid=<%#Eval("ID") %>" target="_blank">
                                        <img src="<%#Eval("IMAGE_CODE").ToString()!=""?GetImageUrl(Eval("IMAGE_CODE").ToString(),"U2"):"/Images/avatar.jpg" %>"
                                            alt="<%#Eval("USER_NAME") %>" width="67px" height="50px" class="picBor" title="<%#Eval("USER_NAME") %>" /></a></dt>
                                    <dd class="f_right greenbglink">
                                        <asp:Literal ID="litAttention" runat="server"></asp:Literal></dd>
                                    <dd>
                                        <strong><a href="Visitor/Default.aspx?uid=<%#Eval("ID") %>" target="_blank">
                                            <%#Eval("USER_NAME") %></a></strong>&nbsp;<span class="grayfont"> </span>
                                    </dd>
                                    <dd>
                                        <%#Eval("SELF_EVALUATION")%>
                                    </dd>
                                </dl>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <!--分页-->
                    <div class="cleanFlex pageBord m_top_10" id="pager" runat="server">
                    </div>
                </div>
            </div>
            <!--右侧-->
            <div class="f_right width_260">
                <div class="srch_link">
                    <%--   <p>
                        <a href="#" class="icon_join">邀请好友关注我</a></p>--%>
                </div>
                <div class="greenbg02 cleanFlex cont">
                    <!--最新加入会员-->
                    <div>
                        <div class="titleNews">
                            <%--   <span class="f_right"><a href="#">更多</a></span>--%>
                            <h2>
                                最新会员</h2>
                        </div>
                        <div>
                            <ul class="imglist imgList04">
                                <asp:Repeater ID="rptNewUser" runat="server">
                                    <ItemTemplate>
                                        <li style="width:75px; height:80px;">
                                            <a href="Visitor/Default.aspx?uid=<%#Eval("ID1") %>" target="_blank">
                                            <img src="<%#Eval("IMAGE_CODE").ToString()!=""?GetImageUrl(Eval("IMAGE_CODE").ToString(),"U2"):"/Images/avatar.jpg" %>"
                                                alt="<%#Eval("USER_NAME") %>" width="67px" height="50px" class="picBor" title="<%#Eval("USER_NAME") %>" /></a>
                                            <p>
                                                <a href="Visitor/Default.aspx?uid=<%#Eval("ID1") %>" target="_blank">
                                                    <%#PageValidate.SqlText(Eval("USER_NAME").ToString(),6) %></a></p>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                    </div>
                    <div class="cleanFlex">
                        <div class="titleNews">
                            <%--<span class="f_right"><a href="#">更多</a></span>--%>
                            <h2>
                                人气用户</h2>
                        </div>
                        <div>
                            <asp:Repeater ID="rptHotUser" runat="server" 
                                onitemdatabound="rptHotUser_ItemDataBound1">
                                <ItemTemplate>
                                    <dl class="imglist cleanFlex">
                                        <dt><a href="Visitor/Default.aspx?uid=<%#Eval("ID1") %>" target="_blank">
                                            <img src="<%#Eval("IMAGE_CODE").ToString()!=""?GetImageUrl(Eval("IMAGE_CODE").ToString(),"U2"):"/Images/avatar.jpg" %>"
                                                alt="<%#Eval("USER_NAME") %>" width="67px" height="50px" class="picBor" title="<%#Eval("USER_NAME") %>" /></a>
                                        </dt>
                                        <dd>
                                            <strong><a href="Visitor/Default.aspx?uid=<%#Eval("ID1") %>" target="_blank">
                                                    <%#PageValidate.SqlText(Eval("USER_NAME").ToString(),10) %></a></strong>
                                        </dd>
                                      <%--  <dd>
                                            我想出去走走</dd>--%>
                                        <dd class="greenbglink">
                                            <asp:Literal ID="litAddgz" runat="server"></asp:Literal>
                                          </dd>
                                    </dl>
                                </ItemTemplate>
                            </asp:Repeater>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="cleanFlex m_top_10">
    </div>
    <uc2:WUCFooter ID="WUCFooter1" runat="server" />
    </form>
</body>
</html>
